﻿using UnityEngine;
using System.Collections;

public class Popup_OneButton : Popup_Base
{
    public UILabel m_TitleLabel;
    public UILabel m_BodyLabel;


    public void SetPopupWithTitleAndBody(string title, string body)
    {
        m_TitleLabel.text = title;
        m_BodyLabel.text = body;
    }

    public override void ButtonTouch(Collider collider)
    {
        switch (collider.gameObject.name)
        {
            case "Button_OK":
                if (m_MessageRecieaver_OK != null && m_Message_OK != null)
                    m_MessageRecieaver_OK.SendMessage(m_Message_OK);

                BackButton();
                break;
            case "Button_Back":
                BackButton();
                break;
        }
    }
}